package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.CategoryPageQueryDTO;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Category;
import com.sky.entity.Dish;
import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
    /*
    * 批量插入口味
    * */
    void insertBatch(List<DishFlavor> flavors);






    //    根据茶品id查询口味
    @Select("select * from dish_flavor where dish_id = #{id}")
    List<DishFlavor> getByDishId(Long id);



    /*
    * 删除口味数据
    * */
    @Delete("delete from dish_flavor where dish_id=#{id}")
    void delete(Long id);


    /*
    * 批量删除口味数据
    * */
    void deleteBatch(List<Long> ids);
}
